<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <!--
    <link href="../static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bootstrap/css/docs.css" rel="stylesheet" type="text/css"/>
    -->
   <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
   <link href="/static/viewback/css/mycss.css" rel="stylesheet" type="text/css"/>
   <title>密码重置</title>
</head>
<body>
<div class="header"></div>
<include file="public:header"/>
<ul class="breadcrumb">
    <li>
      <a href="/Admin/user/userList"><i class="icon-home"></i></a> <span class="divider">/</span>
    </li>
    <li>
      <a href="/Admin/user/userList">会员管理</a> <span class="divider">/</span>
    </li>
    <li class="active">密码重置</li>
 </ul>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span2">
                <include file="public:leftbar"/>
            </div>
            <div class="span10">
                <!--<div class="well">
                    <form class="form-inline" action="/Admin/user/userResetPwd" method="post">
                        <label class="control-label" for="user-id">用户ID</label>
                        <input id="user-id" name="user-id" type="text" class="span3" placeholder="用户ID" autofocus />
                        <label class="control-label" for="username">用户名</label>
                        <input id="username" name="username" type="text" class="span3" placeholder="用户名"/>
                        <input class="btn btn-success" type="submit" value="搜索"/>
                        
                    </form>
                </div>-->
               
                    <form class="form-horizontal" action="/Admin/user/userResetPwd" method="post">
                        <fieldset>
                            <legend><h3>密码重置</h3></legend>
                            
                                <div class="control-group">
                                    <label class="control-label" for="username">用户名</label>
                                    <div class="controls">
                                        
                                        <input id="username" type="text" value="{$username}" name="username" class="span4" required readonly/>
                                    </div>
                                </div>
                                <div class="control-group">  
                                  <label  class="control-label" for="password">新密码</label>
                                  <div class="controls">
                                     
                                      <input id="password" type="password" name="password" class="span4" required autofocus/>
                                  </div>
                                </div>
                                <div class="control-group">  
                                    <label class="control-label" for="confirma_password">确认密码</label>
                                   <div class="controls">
                                       <input id="confirm_password" type="password" name="confirm_password" class="span4" required/>
                                   </div>
                                </div>     
                        
                        <div class="form-actions">
                            <input type="submit" value="重置密码" class="btn btn-primary"/>&nbsp;<font color="green">{$success}</font>
                        </div> 
                    </fieldset>
                </form>  
            </div>
        </div>
</div>
<div class="footer"></div>
<include file="public:footer"/>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/viewback/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
            /*$('#username').keydown(function(e){
                if(e.keyCode == 13){
                    e.preventDefault();
                    if($.trim($(this).val())!=''){
                            $('#password').focus();
                    }else{
                            $(this).attr('placeholder','请输入用户名');
                    }
                }	
            });*/

            $('#password').keydown(function(e){
                if(e.keyCode==13){
                    e.preventDefault();
                    if($.trim($(this).val())!=''){
                            $('#confirm_password').focus();
                    }else{
                            $(this).attr('placeholder','请输入密码');
                    }
                }
            });
            $('#confirm_password').keydown(function(e){
                if(e.keyCode==13){
                    e.preventDefault();
                    if($.trim($(this).val())!=''){
                        $('.btn-primary').trigger('click');
                    }else{
                         $(this).attr('placeholder','请确认密码');
                    }
                }
            });
            $('.btn-primary').click(function(){
                if($.trim($('#password').val())!=$.trim($('#confirm_password').val())){
                    alert('两次密码输入不一致');
                    return false;
                }
        });
    });
    
</script>
</body>
</html>

